/*
 * @Author: 张升 1562821455@qq.com
 * @Date: 2023-07-18 16:25:27
 * @LastEditors: 张升 1562821455@qq.com
 * @LastEditTime: 2023-07-18 18:57:42
 * @FilePath: \react-demo\src\views\testcss\components\cmittem.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import React, { useState, useEffect } from "react";
import cssObj from '../cssmoudle.module.scss'
const List = () => {
    const [peoList, setPeoList] = useState([
        {
            name: 'takzhang',
            age: 29
        },
        {
            name: 'bikdo',
            age: 28
        },
        {
            name: 'jik',
            age: 30
        }
    ])
    return (
        <>
            <ul className={cssObj.namelist}>
                {peoList.map((item, index) => {
                    return (
                        <li className={cssObj.listitem} key={index}>姓名：{item.name} &nbsp; 年龄： {item.age}</li>
                    )
                })}
            </ul>
        </>
    )
}
export default List